package com.example.springsecuritydemo.exception;

/**
 * 自定义异常的基类，将来 controller层advice统一异常处理的时候可以获取到子类的返回的code和message
 * 以防止code和message不匹配
 * @author chenggang
 * @date 2019/04/08
 *
 */
public abstract class BaseException extends RuntimeException{


	private static final long serialVersionUID = -8829601442413773207L;
	
	
	private Integer code;
	
	
	public BaseException(Integer code,String msg) {
		super(msg);
		this.code = code;
	}
	

	public BaseException(String msg, Throwable t) {
		super(msg, t);
	}


	public BaseException(String msg) {
		super(msg);
	}


	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	
}
